package com.projo;

public class User {

    private String name;

    //无参构造  Bean构造器实例化1
    public User() {
        System.out.println("无参构造");
    }

    //有参构造   Bean构造器实例化2
    public User(String name) {
        System.out.println("有参构造");
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void show(){
System.out.println("name="+ name );
 }
}
